<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" >
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>layout 后台大布局 - Layui</title>
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}">
    <i th:replace="~{common :: baseUrl}"></i>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">

    <!--    头部-->
    <i th:replace="~{common :: head}"></i>
    <!--左侧-->
    <div class="layui-side-scroll">
        <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
        <ul class="layui-nav layui-nav-tree"  lay-filter="test">
            <!--            layui-nav-itemed  默认展开列表-->
            <li class="layui-nav-item ">
                <a class="javascript:;" href="javascript:;"><i class="layui-icon layui-icon-rate-solid"></i>  菜品</a>
                <dl class="layui-nav-child">
                    <dd><a th:href="@{/food/category/index}">• 菜品类别</a></dd>
                    <dd><a th:href="@{/food/record/index}">• 菜品档案</a></dd>
                    <dd ><a th:href="@{/food/taste/index}">• 菜品口味</a></dd>
                    <dd><a th:href="@{/food/specification/index}">• 规格管理</a></dd>
                    <dd><a th:href="@{/food/material/index}">• 原料管理</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item ">
                <a class="" href="javascript:;"><i class="layui-icon layui-icon-template-1"></i>  库存</a>
                <dl class="layui-nav-child">
                    <dd><a th:href="@{/inventory/record/index}">• 菜品库存</a></dd>
                    <dd><a th:href="@{/inventory/material/index}">• 原料库存</a></dd>
                    <dd><a th:href="@{/purchase/orders/index}">• 采购单</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item ">
                <a class="" href="javascript:;"><i class="layui-icon layui-icon-form"></i>  报表</a>
                <dl class="layui-nav-child">
                    <dd><a th:href="@{/statement/orders/index}">• 订单报表</a></dd>
                    <dd><a th:href="@{/statement/record/index}">• 菜品流水</a></dd>
                    <dd><a th:href="@{/statement/recordValue/index}">• 菜品销量</a></dd>
                    <dd><a th:href="@{/statement/daily/index}">• 经营日报</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item ">
                <a class="" href="javascript:;"><i class="layui-icon layui-icon-rmb"></i>  促销</a>
                <dl class="layui-nav-child">
                    <dd><a th:href="@{/promotion/specialOffer/index}">• 特价折扣</a></dd>
                    <dd><a th:href="@{/promotion/mealHot/index}">• 套餐热卖</a></dd>
                    <dd><a th:href="@{/promotion/now/index}">• 当前促销</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item">
                <a class="" href="javascript:;"><i class="layui-icon layui-icon-username"></i>  会员</a>
                <dl class="layui-nav-child">
                    <dd><a th:href="@{/member/category/index}">• 会员类别</a></dd>
                    <dd><a th:href="@{/member/set/index}">• 会员设置</a></dd>
                    <dd><a th:href="@{/member/manage/index}">• 会员管理</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:;"><i class="layui-icon layui-icon-auz"></i>  门店</a>
                <dl class="layui-nav-child">
                    <dd><a th:href="@{/shop/assistant/index}">• 店员管理</a></dd>
                    <dd><a th:href="@{/shop/table/index}">• 桌位管理</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item layui-nav-itemed">
                <a href="javascript:;"><i class="layui-icon layui-icon-set-fill"></i>  设置</a>
                <dl class="layui-nav-child">
                    <dd class="layui-this"><a th:href="@{/set/pay/index}">• 支付设置</a></dd>
                    <dd><a th:href="@{/merchants/information/index}">• 商户资料</a></dd>
                </dl>
            </li>
        </ul>
    </div>



    <div class="layui-body layui-bg-gray">
        <!-- 内容主体区域 -->
        <div style="background-color:white; width: 100%;height: 5%;padding-left: 130px;padding-top: 5px" >
        <span class="layui-breadcrumb" >
            <a href="" style="font-size: 20px">设置</a>
             <a href="" style="font-size: 20px">支付设置</a>
        </span>
        </div>

        <!--正文-->
        <div style="background-color:white; width: 90%; height: 90%;margin-top: 1%;margin-left: 4%;padding-top: 1%;padding-left: 1%;padding-right: 1%">
            <form class="layui-form" action="" lay-filter="set">
            <!--查询条件-->
            <!--展示数据-->

                <div class="layui-form-item">
                    <div class="layui-inline">

                        <div class="layui-input-inline">
                            <select id="merchantsId" name="merchantsId" lay-verify="required" lay-search="" lay-filter="merchantsId" disabled>
                                <option value="">店铺名称</option>
                                <option th:each="l : ${merchantsInformationList}" th:value="${l.id}" th:text="${l.name}"
                                        th:selected='${l.id == 2019001}'

                                >无</option>
                            </select>

                        </div>
                    </div>
                </div>


                <div style="padding: 20px; background-color: #F2F2F2;">
                    <div class="layui-row layui-col-space15">
                        <div class="layui-col-md12">
                            <div class="layui-card">
                                <div class="layui-card-header">支付设置</div>
                                <div class="layui-card-body">



                                    <div class="layui-form-item">
                                        <label class="layui-form-label">支付宝支付：</label>
                                        <div class="layui-input-block">
                                            <input type="radio" lay-filter="radio" name="Alipay" value="1" title="开启" th:checked="${setPay.Alipay == 1}">
                                            <input type="radio" lay-filter="radio" name="Alipay" value="0" title="关闭" th:checked="${setPay.Alipay == 0}">
                                        </div>
                                    </div>

                                    <div class="layui-form-item">
                                        <label class="layui-form-label">微信支付：</label>
                                        <div class="layui-input-block">
                                            <input type="radio" lay-filter="radio" name="WeChat" value="1" title="开启" th:checked="${setPay.WeChat == 1}">
                                            <input type="radio" lay-filter="radio" name="WeChat" value="0" title="关闭" th:checked="${setPay.WeChat == 0}">
                                        </div>
                                    </div>

                                    <div class="layui-form-item">
                                        <label class="layui-form-label">银行卡支付：</label>
                                        <div class="layui-input-block">
                                            <input type="radio" lay-filter="radio" name="bankCard" value="1" title="开启" th:checked="${setPay.bankCard == 1}">
                                            <input type="radio" lay-filter="radio" name="bankCard" value="0" title="关闭" th:checked="${setPay.bankCard == 0}">
                                        </div>
                                    </div>

                                    <div class="layui-form-item">
                                        <label class="layui-form-label">积分支付：</label>
                                        <div class="layui-input-block">
                                            <input type="radio" lay-filter="radio" name="integral" value="1" title="开启" th:checked="${setPay.integral == 1}">
                                            <input type="radio" lay-filter="radio" name="integral" value="0" title="关闭" th:checked="${setPay.integral == 0}">
                                        </div>
                                    </div>

                                </div>
                            </div>
                        </div>
                    </div>
                </div>

            </form>
        </div>


    </div>



    <!--底部-->
    <i th:replace="~{common :: footer}"></i>
</div>
<script th:src="@{/layui/layui.js}"></script>
<script th:inline="none">
    //JavaScript代码区域
    layui.use(['element','form'], function(){
        var element = layui.element;
        var form = layui.form;
        var $ = layui.$;

        $("#img1").attr("src",$("#headPortrait")[0].innerText)


        form.on('radio(radio)', function(data){

            // console.log(form.val("set")) //被点击的radio的value值

            //发送ajax请求  编辑APP信息
            $.ajax({
                url:baseUrl+"set/pay/edit",
                data:form.val("set"),
                type:"post",
                dataType:"json",
                success:function (result) {
                    if (result.code==0){
                       
                    }else {
                        layer.open({
                            title: '编辑菜品分类信息'
                            ,content: result.msg
                        });
                    }
                },
                error:function () {
                    layer.msg("服务器原地爆炸,请联系管理员!!!");
                }
            })


        });


    });
</script>
</body>
</html>
